.class public Lcom/glympse/android/glympse/DlgShell;
.super Lcom/glympse/android/glympse/DlgBase;
.source "DlgShell.java"

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Landroid/content/DialogInterface$OnDismissListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/glympse/android/glympse/DlgShell$DlgShellListener;,
        Lcom/glympse/android/glympse/DlgShell$OnClickDialog;,
        Lcom/glympse/android/glympse/DlgShell$OnClickFrame;
    }
.end annotation


# instance fields
.field private m_fCalledCancel:Z

.field private m_fCalledOk:Z

.field protected m_fDismissOnClickOutside:Z

.field protected m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

.field protected m_oViewGroupPanel:Landroid/view/ViewGroup;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;I)V
    .locals 1
    .parameter "oContext"
    .parameter "strName"
    .parameter "nPanelId"

    .prologue
    .line 66
    const/4 v0, -0x1

    invoke-direct {p0, p1, p2, p3, v0}, Lcom/glympse/android/glympse/DlgShell;-><init>(Landroid/content/Context;Ljava/lang/String;II)V

    .line 67
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;II)V
    .locals 5
    .parameter "oContext"
    .parameter "strName"
    .parameter "nPanelId"
    .parameter "nTheme"

    .prologue
    const/4 v3, 0x0

    const/4 v4, 0x1

    const/4 v2, 0x0

    .line 38
    invoke-direct {p0, p1, p2, p4}, Lcom/glympse/android/glympse/DlgBase;-><init>(Landroid/content/Context;Ljava/lang/String;I)V

    .line 28
    iput-object v3, p0, Lcom/glympse/android/glympse/DlgShell;->m_oViewGroupPanel:Landroid/view/ViewGroup;

    .line 29
    iput-boolean v2, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledOk:Z

    .line 30
    iput-boolean v2, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledCancel:Z

    .line 31
    iput-boolean v4, p0, Lcom/glympse/android/glympse/DlgShell;->m_fDismissOnClickOutside:Z

    .line 33
    iput-object v3, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    .line 41
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgShell;->getWindow()Landroid/view/Window;

    move-result-object v2

    const/4 v3, 0x2

    invoke-virtual {v2, v3}, Landroid/view/Window;->setSoftInputMode(I)V

    .line 44
    const v2, 0x7f03000d

    invoke-virtual {p0, v2}, Lcom/glympse/android/glympse/DlgShell;->setContentView(I)V

    .line 47
    invoke-static {}, Lcom/glympse/android/glympse/Glympse;->IsTablet()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 49
    const v2, 0x7f0c003a

    invoke-virtual {p0, v2}, Lcom/glympse/android/glympse/DlgShell;->findViewById(I)Landroid/view/View;

    move-result-object v2

    new-instance v3, Lcom/glympse/android/glympse/DlgShell$OnClickFrame;

    invoke-direct {v3, p0}, Lcom/glympse/android/glympse/DlgShell$OnClickFrame;-><init>(Lcom/glympse/android/glympse/DlgShell;)V

    invoke-virtual {v2, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 50
    const v2, 0x7f0c003b

    invoke-virtual {p0, v2}, Lcom/glympse/android/glympse/DlgShell;->findViewById(I)Landroid/view/View;

    move-result-object v2

    new-instance v3, Lcom/glympse/android/glympse/DlgShell$OnClickDialog;

    invoke-direct {v3, p0}, Lcom/glympse/android/glympse/DlgShell$OnClickDialog;-><init>(Lcom/glympse/android/glympse/DlgShell;)V

    invoke-virtual {v2, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 54
    :cond_0
    const v2, 0x7f0c003f

    invoke-virtual {p0, v2}, Lcom/glympse/android/glympse/DlgShell;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/FrameLayout;

    .line 57
    .local v0, oFramePanel:Landroid/widget/FrameLayout;
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgShell;->getContext()Landroid/content/Context;

    move-result-object v2

    invoke-static {v2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    .line 58
    .local v1, oInflater:Landroid/view/LayoutInflater;
    invoke-virtual {v1, p3, v0, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/view/ViewGroup;

    iput-object v2, p0, Lcom/glympse/android/glympse/DlgShell;->m_oViewGroupPanel:Landroid/view/ViewGroup;

    .line 60
    invoke-virtual {p0, p0}, Lcom/glympse/android/glympse/DlgShell;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

    .line 61
    return-void
.end method


# virtual methods
.method public GetCancelButton()Landroid/widget/Button;
    .locals 1

    .prologue
    .line 78
    const v0, 0x7f0c0042

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/DlgShell;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/Button;

    return-object p0
.end method

.method public GetOkButton()Landroid/widget/Button;
    .locals 1

    .prologue
    .line 72
    const v0, 0x7f0c0041

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/DlgShell;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/Button;

    return-object p0
.end method

.method public GetTitleImage()Landroid/widget/ImageView;
    .locals 1

    .prologue
    .line 84
    const v0, 0x7f0c003d

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/DlgShell;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/ImageView;

    return-object p0
.end method

.method public PerformClick(I)V
    .locals 3
    .parameter "nId"

    .prologue
    const/4 v2, 0x1

    const/4 v1, 0x0

    .line 177
    packed-switch p1, :pswitch_data_0

    .line 192
    iget-boolean v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledOk:Z

    if-nez v0, :cond_0

    iget-boolean v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledCancel:Z

    if-nez v0, :cond_0

    .line 194
    iput-boolean v1, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledOk:Z

    .line 195
    iput-boolean v2, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledCancel:Z

    .line 197
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    if-eqz v0, :cond_0

    .line 199
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    invoke-interface {v0, p0}, Lcom/glympse/android/glympse/DlgShell$DlgShellListener;->OnCancel(Lcom/glympse/android/glympse/DlgShell;)V

    .line 202
    :cond_0
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgShell;->cancel()V

    .line 205
    :goto_0
    return-void

    .line 180
    :pswitch_0
    iput-boolean v2, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledOk:Z

    .line 181
    iput-boolean v1, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledCancel:Z

    .line 183
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    if-eqz v0, :cond_1

    .line 185
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    invoke-interface {v0, p0}, Lcom/glympse/android/glympse/DlgShell$DlgShellListener;->OnOk(Lcom/glympse/android/glympse/DlgShell;)V

    .line 187
    :cond_1
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgShell;->dismiss()V

    goto :goto_0

    .line 177
    nop

    :pswitch_data_0
    .packed-switch 0x7f0c0041
        :pswitch_0
    .end packed-switch
.end method

.method public PerformOkClick()V
    .locals 1

    .prologue
    .line 210
    const v0, 0x7f0c0041

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/DlgShell;->PerformClick(I)V

    .line 211
    return-void
.end method

.method public SetButtonsVisible(Z)V
    .locals 2
    .parameter "fVisible"

    .prologue
    .line 90
    const v0, 0x7f0c0040

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/DlgShell;->findViewById(I)Landroid/view/View;

    move-result-object v0

    if-eqz p1, :cond_0

    const/4 v1, 0x0

    :goto_0
    invoke-static {v0, v1}, Lcom/glympse/android/glympse/Glympse;->SetVisibilityIfChanged(Landroid/view/View;I)Z

    .line 91
    return-void

    .line 90
    :cond_0
    const/16 v1, 0x8

    goto :goto_0
.end method

.method public SetCancelText(I)V
    .locals 2
    .parameter "nTextId"

    .prologue
    .line 107
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgShell;->GetCancelButton()Landroid/widget/Button;

    move-result-object v0

    .line 109
    .local v0, oButtonCancel:Landroid/widget/Button;
    invoke-virtual {v0, p1}, Landroid/widget/Button;->setText(I)V

    .line 110
    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 111
    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/glympse/android/glympse/Glympse;->SetVisibilityIfChanged(Landroid/view/View;I)Z

    .line 112
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/DlgShell;->SetButtonsVisible(Z)V

    .line 113
    return-void
.end method

.method public SetDlgShellListener(Lcom/glympse/android/glympse/DlgShell$DlgShellListener;)V
    .locals 0
    .parameter "oDlgShellListener"

    .prologue
    .line 142
    iput-object p1, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    .line 143
    return-void
.end method

.method public SetOkText(I)V
    .locals 2
    .parameter "nTextId"

    .prologue
    .line 96
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgShell;->GetOkButton()Landroid/widget/Button;

    move-result-object v0

    .line 98
    .local v0, oButtonOk:Landroid/widget/Button;
    invoke-virtual {v0, p1}, Landroid/widget/Button;->setText(I)V

    .line 99
    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 100
    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/glympse/android/glympse/Glympse;->SetVisibilityIfChanged(Landroid/view/View;I)Z

    .line 101
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/DlgShell;->SetButtonsVisible(Z)V

    .line 102
    return-void
.end method

.method public SetTitleIcon(I)V
    .locals 1
    .parameter "nImageId"

    .prologue
    .line 124
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgShell;->GetTitleImage()Landroid/widget/ImageView;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 125
    return-void
.end method

.method public SetTitleIcon(Landroid/graphics/drawable/Drawable;)V
    .locals 1
    .parameter "oDrawable"

    .prologue
    .line 118
    invoke-virtual {p0}, Lcom/glympse/android/glympse/DlgShell;->GetTitleImage()Landroid/widget/ImageView;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 119
    return-void
.end method

.method public SetTitleText(I)V
    .locals 1
    .parameter "nTextId"

    .prologue
    .line 130
    const v0, 0x7f0c003e

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/DlgShell;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/TextView;

    invoke-virtual {p0, p1}, Landroid/widget/TextView;->setText(I)V

    .line 131
    return-void
.end method

.method public SetTitleText(Ljava/lang/String;)V
    .locals 1
    .parameter "strTitle"

    .prologue
    .line 136
    const v0, 0x7f0c003e

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/DlgShell;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/TextView;

    invoke-virtual {p0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 137
    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1
    .parameter "oView"

    .prologue
    .line 171
    if-eqz p1, :cond_0

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    :goto_0
    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/DlgShell;->PerformClick(I)V

    .line 172
    return-void

    .line 171
    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public onDismiss(Landroid/content/DialogInterface;)V
    .locals 2
    .parameter "dialog"

    .prologue
    .line 153
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    if-eqz v0, :cond_1

    .line 155
    iget-boolean v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledOk:Z

    if-nez v0, :cond_0

    iget-boolean v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledCancel:Z

    if-nez v0, :cond_0

    .line 157
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledCancel:Z

    .line 158
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    invoke-interface {v0, p0}, Lcom/glympse/android/glympse/DlgShell$DlgShellListener;->OnCancel(Lcom/glympse/android/glympse/DlgShell;)V

    .line 161
    :cond_0
    iget-object v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    iget-boolean v1, p0, Lcom/glympse/android/glympse/DlgShell;->m_fCalledOk:Z

    invoke-interface {v0, p0, v1}, Lcom/glympse/android/glympse/DlgShell$DlgShellListener;->OnDismissed(Lcom/glympse/android/glympse/DlgShell;Z)V

    .line 163
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/glympse/android/glympse/DlgShell;->m_oDlgShellListener:Lcom/glympse/android/glympse/DlgShell$DlgShellListener;

    .line 165
    :cond_1
    return-void
.end method
